package yf.mall.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;


import java.math.BigDecimal;

import yf.mall.entity.LotteryGoodsEntity;
import yf.mall.vo.LotteryGoodsVo;

                        import yf.mall.enums.LotteryGoodsStatusEnum;
            
/**
 * 中奖奖品实体
 * 表名 lottery_goods
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Thu Aug 20 11:18:45 CST 2020
 */
@Data
public class LotteryGoodsDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //活动ID
            @ExcelProperty("活动ID")
            private Long actId;
        
                        //奖品名称
            @ExcelProperty("奖品名称")
            private String name;
        
                        //逆时针排序
            @ExcelProperty("逆时针排序")
            private Integer idx;
        
                        //权重
            @ExcelProperty("权重")
            private Integer weight;
        
                        //ENUM-启用:"NO-未启用","YES-启用"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("启用")
            private String statusStr;
        
                        //出一个的次数
            @ExcelProperty("出一个的次数")
            private Integer pr;
        
                        //IMG-奖品图
            @ExcelProperty("IMG-奖品图")
            private String goodsImg;
        
                        //内定中奖者
            @ExcelProperty("内定中奖者")
            private String code;
        
    
    public LotteryGoodsDown() {

    }

    public LotteryGoodsDown(LotteryGoodsVo vo) {
        LotteryGoodsEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setActId(entity.getActId());
            
                                    this.setName(entity.getName());
            
                                    this.setIdx(entity.getIdx());
            
                                    this.setWeight(entity.getWeight());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( LotteryGoodsStatusEnum.indexOf(entity.getStatus()));
                }
            
                                    this.setPr(entity.getPr());
            
                                    this.setGoodsImg(entity.getGoodsImg());
            
                                    this.setCode(entity.getCode());
            
            }


}
